import Taro from '@tarojs/taro';
import getSystemInfoSync = Taro.getSystemInfoSync;
import getNetworkType = Taro.getNetworkType;

export interface IDefaultGlobalData {
    appStartOptions: any;
    systemInfo: getSystemInfoSync.Result;
    networkType: keyof getNetworkType.NetworkType;
    headerPosition: Taro.getMenuButtonBoundingClientRect.Rect;
    tabIndex: number;
    host: string;
    Authorization: string
    categoryName: string
    parentCategoryName: string
}

export interface HeadersData {
    cookie?: string;
    'Content-Type'?: string;
    'Content-Length'?: number;
}
export interface RequestSetting {
    headers?: HeadersData;
    method?: 'GET' | 'OPTIONS' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'CONNECT';
    timeout?: number;
    delReqUUIDKeys?: Array<Array<string>>;
    isTimeoutSpecial?: boolean;
    loading?: string;
}



export interface IQOOLOGIN {
    code: string;
    encryptedData: string;
    iv: string
    from: number
    authtoken?: any
}

interface TYPE {
    switchTab?: 'switchTab';
    navigateTo?: 'navigateTo';
    redirectTo?: 'redirectTo';
    reLaunch?: 'reLaunch';
    navigateBack?: 'navigateBack';
}

export interface JUMPTYPE {
    type?: TYPE;
}
